$(function() {

	//1.新增或更新用户信息
	$.ajax({
		method: "post",
		url: "http://student.bluej.cn/index/wedding/upload_user",
		async: true,
		data: {
			"wechat_id": sessionStorage.openId,
			"name": sessionStorage.nickName,
			"province": sessionStorage.province,
			"city": sessionStorage.city,
			"head_img": sessionStorage.headImg
		},
		dataType: "jsonp",
		success: function(res) {
			console.log(res);
		}
	})

	var music = document.querySelector(".bgMusic");
	$(".audioBtn").click(function() {
		if(music.paused) {
			music.play();
		} else {
			music.pause();
		}

	});

	$(".audioBtn").click(function() {
		$(".img2").toggleClass("kaig");
		$(".zanting").toggleClass("dh");
	});
	$(".customization").on("touchstart", function() {
		$(".active").css("display", "block");
	});
	$(".cha-img").on("touchstart", function() {
		$(".active").css("display", "none");
	})

	$(".index-web .text .free").on("click", function() {
		location.href = "Gtpoint.html";
	})
	$(".active .view .rules").on("click", function() {
		location.href = "Activity_rule.html";
	})
	$("Ranking_List-foot").on("click", function() {
		location.href = "index.html";

	})
})